export const request=(params) => {
    // https://api-hmugo-web.itheima.net/api/public/v1/home/swiperdata
    // 定义公共url
    const baseUrl = 'https://api-hmugo-web.itheima.net/api/public/v1';
    params.url = baseUrl + params.url;
    // console.log(params);
return new Promise((resolve,reject) => {
    wx.request({
        ...params,
        success:(result)=> {
            resolve(result.data.message);
        },
        fail: (err)=> {
            reject(err);
        }
    })
})
}